//
//  RootClass.m
//  __PRODUCTNAME__
//
//  Created by 鹏飞罗 on 16/08/15
//  Copyright (c) dllo. All rights reserved.
//

#import "RootClass.h"
#import "Data.h"

@implementation RootClass
- (void)setValue:(id)value forKey:(NSString *)key {
    [super setValue:value forKey:key];
    if ([key isEqualToString:@"data"]) {
        NSMutableArray<Data *> *dataArray = [NSMutableArray array];
        NSArray *dataArr = value;
        for (NSDictionary *dataDic in dataArr) {
            Data *data = [Data modelWithDictionary:dataDic];
            [dataArray addObject:data];
        }
        _data = dataArray;
    }
}
+ (NSDictionary *)objectClassInArray{
    return @{@"data" : [Data class]};
}

@end
